<!--Descriptive page name, messages and instructions-->
<h2><%= t('.gifts.gifts_in_collection', :default => "Gifts in %{collection}", :collection => h(@collection.title)) %></h2>
<!--/descriptions-->

<!--subnavigation, sorting and actions-->
<%= render :partial => 'gifts/gift_search' %>
<!--/subnav-->

<!--main content-->
<table summary="Lists all the gifts in the collection, who gave and recieved each one, and what the giver received from the larger exchange">
	<caption>Gifts and givers<caption>
  <thead>
	<tr>
    <th scope="col">Gift</th>
    <th scope="col">Recipient</th>
    <th scope="col">Author</th>
    <th scope="col">Author Has Received?</th>
  </tr>
	</thead>
  <tbody>
<% for gift in @gifts %>
    <tr>
      <td>
        <%= link_to gift.work.title, 
                    collection_work_path(@collection, gift.work) %>
      </td>
      <td>
        <%= gift.recipient_name %>
      </td>
      <td>
        <%= gift.work.pseuds.collect {|p| "#{p.byline} (#{p.user.email})"}.join(", ") %>
      </td>
      <td>
        <%= @has_received[gift.id] %>
      </td>
    </tr>
  <% end %>
</tbody>
</table>
<h4>Note</h4>
<p>
  M* - Manual: This means that this creator has received a story in this collection, but under a different pseudonym. 
  That might happen if the creator used a different pseud to post their story than the one
  their author used as the recipient name, or it might be the case that the creator has also posted a story for 
  a different user (eg as a proxy for someone who doesn't have an archive account), and has not gotten a story
  for herself. 
</p>
<!--/content-->